import time
import threading


def sing():
    '''唱歌'''
    for i in range(5):
        print('正在唱歌\n')
        time.sleep(1)


def dance():
    '''跳舞'''
    for i in range(5):
        print('正在跳舞')
        time.sleep(1)


def main():
    t1 = threading.Thread(target =sing)
    t2 = threading.Thread(target =dance)
    t1.start()
    t2.start()
    
    while True:
        print(threading.enumerate())
        c = len(threading.enumerate())
        print(c)

        if c <= 2:
            break 
        
        time.sleep(1)



    
if __name__ == '__main__':
    main()
